﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="FashionMural.Web.Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="ser">
        <div class="ser_hea">
            <h1>服务项目</h1>
            <h2><a href="/Servers.aspx">+ MORE</a></h2>
        </div>
        <div class="bizhi">
            <ul>
                <%if (this.ServerPages != null)
                  {
                      foreach (var p in ServerPages)
                      {
                %>
                <li>
                   <div style="width:259px;height:40px;background-image:url(/images/fuwu_bg03.jpg)"> <a style="padding:14px 50px 14px 30px;display :inline-block" id="desc<%=p.Id %>" onclick="ServerClick(this);" style="cursor: pointer"><%=p.PageName %></a>

                       <img style="float:right;margin-right:40px; height:30px;margin-top:5px; display :inline-block" src="/images/fuwu_bg0<%=PageImageIndex++%3+1%>_icon.jpg" />
                   </div>
                </li>
                <%
                      }
                  }
                %>
            </ul>
        </div>
        <div class="tese">
            <%if (this.ServerPages != null)
              {
                  foreach (var p in ServerPages)
                  {
            %>
            <div style="display: none;height:100%;" id="pdesc<%=p.Id %>">
                <div style="height:90%;"><%=p.PageDescribe %></div>
                <a style="height:10%;float:right;display:block" href="/Servers.aspx?t=<%=p.Id%>">【更多详情】</a>
            </div>
            <%
                  }
              }
            %>
        </div>

    </div>
    <div class="news">
        <div class="news_hea">
            <h1>新闻资讯</h1>
            <h2><a href="/News.aspx">+ MORE</a></h2>
        </div>

        <div class="news_list">
            <ul class="llst02">
            </ul>
            <%if (NewsLinks != null)
              {%>
            <ul class="llst01">
                <%
                  foreach (var l in NewsLinks)
                  {
                %>
                <li><a href="/NewDetail.aspx?t=<%=l.Id %>"><%=l.Title %></a></li>
                <%
                  }%>
            </ul>
            <%
              }%>
        </div>

    </div>

    <div class="products">
        <p>
            <%if (ProductPages != null)
              {
                  foreach (var p in ProductPages)
                  {
            %>
            <a style="cursor:pointer" onclick="ChangPimg('<%=p.Id %>');"><%=p.PageName %></a>&nbsp|&nbsp
            <%
                  }
              } %>
        </p>
        <%if (ProductPages != null && ImageDic != null)
          {

              foreach (var p in ProductPages)
              {
        %>
        <div class="imgscontnt" id="pimgs<%=p.Id %>">
            <%foreach (var img in ImageDic[p.Id])
              { 
            %>
            <dl>
                <dd>
                    <img class="indexImglist" src="<%=img.Path%>" /></dd>
                <dt><a  href="ProjuctDetail.aspx?ct=img&f=<%=p.Id %>&t=<%=img.Id %>"><%=img.Title %></a></dt>
            </dl>
            <%
              } %>
        </div>
        <%          
              }
          } %>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("div.tese div[id]").first().show();
            $("div.products  div.imgscontnt").hide();
            $("div.products  div.imgscontnt").first().show();
        });
        function ServerClick(item) {
            $("div.tese div[id]").hide();
            $("#p" + $(item).attr("id")).show();
        }
        function ChangPimg(pid) {
            $("div.products  div.imgscontnt").hide();
            $("#pimgs" + pid).show();
        }
    </script>
</asp:Content>
